﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using HUBS1.HCMS.Entity;
using HUBS1.HCMS.Data;

namespace HUBS1.HCMS.SqlClient
{
    public class sql_hairport
    {
        public List<h_airport> getallitem(int id)
        {
            return ExecSql.GetTableList<h_airport>("select * from h_airport where property_id="+id.ToString());
        }

        public bool delitem(int id)
        {
           if(ExecSql.SqlExecNoquery("delete from h_airport where airport_id="+id.ToString())>0)
               return true;
           else
               return false;
        }

        public bool insertorupdate(h_airport _airport)
        {
            return ExecSql.InsertOrUpdateData<h_airport>(_airport);
        }
    }
}
